const sequelize = require('../mysql/mysql');
const Sequelize = require('sequelize');
const Nutrition = sequelize.define('nutrition', {
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrement: true,
    },
    name: {
        type: Sequelize.STRING,
        allowNull: false,
    },
    protein: {
        type: Sequelize.DOUBLE(255, 0),
        defaultValue: null,
    },
    fat: {
        type: Sequelize.DOUBLE(255, 0),
        defaultValue: null,
    },
    carb: {
        type: Sequelize.DOUBLE(255, 0),
        defaultValue: null,
    },
    type: {
        type: Sequelize.STRING,
        defaultValue: null,
    }
}, {
    tableName: 'foods',
    timestamps: false
});


module.exports = Nutrition;